package com.java.day13.hashMap;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;

/**
 * 使用HashMap代表对象
 */
public class HashMapDemo03 {
    public static void main(String[] args) {

        HashMap<String, Object> mailInOf = new HashMap<>();
        mailInOf.put("sender","zjt");
        mailInOf.put("title","XXX");
        mailInOf.put("Date",new Date());
        mailInOf.put("receive","ztt");

//        System.out.println(mailInOf);

        HashMap<String, Object> mailInOf1 = new HashMap<>();
        mailInOf1.put("sender","steam");
        mailInOf1.put("title","XXXXXX");
        mailInOf1.put("Date",new Date());
        mailInOf1.put("receive","ztt");

//        System.out.println(mailInOf1);


        ArrayList<HashMap<String, Object>> list = new ArrayList<>();
        list.add(mailInOf);
        list.add(mailInOf);
        list.add(mailInOf1);

        System.out.println(list);

    }
}
